package cloudgamesaumysql

import (
	"github.com/shopspring/decimal"
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/12/27 18:24
*/

// CGGameAUBatchUserRefundItem 云游戏AU用户充值（订单）记录批处理退款表
type CGGameAUBatchUserRefundItem struct {
	ID                     int64           `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	BatchRefundID          string          `json:"batch_refund_id" gorm:"column:batch_refund_id;type:varchar(256);default:'';not null;comment:批处理ID"`
	Phone                  string          `json:"phone" gorm:"column:phone;type:varchar(128);default:'';not null;comment:手机号"`
	RechargeType           string          `json:"recharge_type" gorm:"column:recharge_type;type:varchar(32);not null;default:'';comment:充值方式"`
	TopUpPlatform          string          `json:"top_up_platform" gorm:"column:top_up_platform;type:varchar(32);not null;default:'';comment:充值平台，微信/支付宝"`
	TransactionOrderNumber string          `json:"transaction_order_number" gorm:"column:transaction_order_number;type:varchar(256);default:'';not null;comment:平台侧的订单号"`
	RechargeOrderID        string          `json:"recharge_order_id" gorm:"column:recharge_order_id;type:varchar(256);not null;default:'';comment:支付侧的订单ID"`
	TransactionAmount      decimal.Decimal `json:"transaction_amount" gorm:"column:transaction_amount;type:decimal(12,2);not null;default:0.00;comment:退款金额"`
	OrderCreatedAt         time.Time       `json:"order_created_at" gorm:"column:order_created_at;type:datetime;default:null;comment:订单时间"`
	RefundTime             time.Time       `json:"refund_time" gorm:"column:refund_time;type:datetime;default:null;comment:退款时间"`
	RefundState            string          `json:"refund_state" gorm:"column:refund_state;type:varchar(512);not null;default:'';comment:订单退款状态"`
	CreatedAt              time.Time       `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt              time.Time       `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt              gorm.DeletedAt  `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUBatchUserRefundItem) TableName() string {
	return "cg_game_au_batch_user_refund_item"
}
